home *** CD-ROM | disk | FTP | other *** search
- var yy, mm, dd : word;
- mmm,ddd : string;
- i : integer;
- function RemoveSlash(Input: string): string;
- begin
- if Input <> '' then
- if Input[Length(Input)] = '\' then
- Result := Copy(Input, 0, Length(Input) - 1)
- else
- Result := Input;
- end;
- function removefileext(input : string) : string;
- var
- I: Integer;
- begin
- I := LastDelimiter('.\:', input);
- if (I > 0) and (input[I] = '.') then
- Result := Copy(input, 0, i-1) else
- Result := input;
- end;
- begin
- Decodedate(now,yy,mm,dd);
- if mm < 10 then mmm := '0' + inttostr(mm) else mmm := inttostr(mm);
- if dd < 10 then ddd := '0' + inttostr(dd) else ddd := inttostr(dd);
- if pos('*',Param.strings[0]) > 1 then //Directory
- New(RemoveSlash(Extractfilepath(Param.strings[0])) + '_' +
- mmm + ddd + inttostr(yy)+'.zip') else
- New(Removefileext(Param.strings[0]) + '_' +
- mmm + ddd + inttostr(yy)+'.zip');
- for i := 0 to Param.count -1 do
- Add(Param.strings[i]);
- Doadd;
- end.
-